package v1

import (
	"github.com/gin-gonic/gin"
	"hytx_media/service/article_service"
	"hytx_media/pkg/app"
	"net/http"
	"hytx_media/pkg/e"
)

func GetArticleLabels(c *gin.Context)  {
	appG :=  app.Gin{c}
	articleLabelsService  := article_service.ArticleLabel{}
	articleLabels, err := articleLabelsService.GetAll()
	if  err != nil {
		appG.ResponseMsg(http.StatusOK, "标签为空！",nil)
	}
	data := make(map[string]interface{})
	data["lists"] = articleLabels

	appG.Response(http.StatusOK, e.SUCCESS, data)

}
